package com.iweb.exec;

import com.iweb.common.result.EmptyObject;
import com.iweb.common.result.ResultEntity;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class BaseExceptionHandler {

    @ExceptionHandler(Exception.class)
    public ResultEntity<EmptyObject> handler(Exception e) {
        e.printStackTrace();
        return ResultEntity.SYS_ERROR(e.getMessage());
    }
}
